package com.zhuang.chapter16.work01;

public class BankMain {

	public static void main(String[] args) {
		// 1.创建银行卡对象
		BankCard card = new BankCard();
		// 2.存钱功能
		SaveMoney1 save1 = new SaveMoney1(card);
		SaveMoney2 save2 = new SaveMoney2(card);
		Thread a = new Thread(save1, "小康");
		Thread b = new Thread(save2, "小庄");

		a.start();
		try {
			Thread.sleep(5);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		b.start();
	}

}
